<?php
    $this->title = "Добавление новости";
    $this->headTitle($this->title);
   // echo $this->form ;
?>

<form method="post" action="<?php echo $this->url(array(),'adminaddnews',true);?>" id="registration-form">

    <fieldset>
        <legend>Добавление категории</legend>
        <div class="error" >
            Одно или несколько полей заполнены неверно. Проверьте, пожалуйста, 
            поля с ошибками и отправьте форму ещё раз.
        </div>

        <div class="row" id="form_username_container">
            <label for="form_name">Название:</label>
            <input type="text" id="form_name"
                   name="name" value="<?php echo $this->fp->name ?>" />
        </div>
        
         <div class="row" id="form_username_container">
            <label for="form_name">H1:</label>
            <input type="text" id="form_name"
                   name="h1" value="<?php echo $this->fp->h1 ?>" />
        </div>

 <div class="row" id="form_username_container">
            <label for="form_name">meta-descr:</label>
            <input type="text" id="form_name"
                   name="description" value="<?php echo $this->fp->description ?>" />
        </div>

 <div class="row" id="form_username_container">
            <label for="form_name">meta-keywords:</label>
            <input type="text" id="form_name"
                   name="keywords" value="<?php echo $this->fp->keywords ?>" />
        </div>

 <div class="row" id="form_username_container">
            <label for="form_name">alias:</label>
            <input type="text" id="form_name"
                   name="alias" value="<?php echo $this->fp->alias ?>" />
        </div>
      <div class="row" id="form_username_container">
            <label id="lol" for="form_name">image:</label>
             <div class="image">
          <?php if ($this->fp->image) {?> <img src="<?php echo $this->fp->image; ?>" alt="" id="thumb">
          <? } else { ?>     <img src="/images/no_image.jpg" alt="" id="thumb">          <? } ?>
                <input type="hidden" name="image" value="<?php echo $this->fp->image; ?>" id="image">
                  <br>
                  <a onclick="image_upload('image','thumb');">Обзор</a>&nbsp;&nbsp;|&nbsp;&nbsp;
                  <a onclick="$('#thumb').attr('src', '/images/no_image.jpg'); $('#image').attr('value', '');">Очистить</a></div>
         </div>
 <div class="row" id="form_username_container">
            <label for="form_name">short:</label>
                <textarea type="text" id="form_short" class="ckeditor" name="short"><?php echo $this->fp->short; ?></textarea>
        </div>

 <div class="row" id="form_username_container">
            <label for="form_name">full:</label>
             <textarea type="text" id="form_full" class="ckeditor" name="full"><?php echo $this->fp->full; ?></textarea>
        </div>

        
  

        
        <div class="submit">
            <input type="submit" value="Добавить" />
        </div>
    </fieldset>
</form>
<div id="elfinder"></div>